package com.orhonit.ipb.portal.biz;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.orhonit.ipb.portal.entity.TbPmEducationExperience;
import com.orhonit.ipb.portal.mapper.TbPmEducationExperienceMapper;
import com.orhonit.ipb.security.common.biz.BusinessBiz;


/**
 * 党员学习经历表
 *
 * @author 
 * @email 
 * @version 2018-05-22 09:27:47
 */
@Service
public class TbPmEducationExperienceBiz extends BusinessBiz<TbPmEducationExperienceMapper,TbPmEducationExperience> {
	
	@Autowired
	private TbPmEducationExperienceMapper tbPmEducationExperienceMapper;
	/**
	 * 通过userid查找教育经历
	 * @param userId
	 * @return
	 */
	public List<TbPmEducationExperience> getTbPmEducationExperienceByuserId(String userId){
		return tbPmEducationExperienceMapper.getTbPmEducationExperienceByuserId(userId);
	}
	/**
	 * 批量添加
	 * @param list
	 * @return Integer
	 */
	@Transactional(rollbackFor = Exception.class)
	public boolean BatchInsertTbPmEducationExperience(List<TbPmEducationExperience> list){
		boolean a=false;
		int count=tbPmEducationExperienceMapper.BatchInsertTbPmEducationExperience(list);
		if(count>0){
			a=true;
		}
		return a;
	}
}